package demo.entity.service;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;

import demo.dao.UserDao;
import demo.entity.User;

@Component
public class UserService {
    private Log log = LogFactory.getLog(this.getClass());

    @Resource(name = "userDao")
    private UserDao userDao;

    private static UserService instance;

    @PostConstruct
    public void init() {
        // initialize with some initial data
        // User user = userDao.newInstance();
        
        // user.setUsername("");
        // user.setPassword("");
        // userDao.create(user);

        instance = this;
    }

    public UserDao getUserDao() {
        return this.userDao;
    }
    
    public static UserService getInstance() {
        return instance;
    }
}// clickframes::version=3895445723::clickframes